/* indent size: 2 */

module.exports = app => {
  const DataTypes = app.Sequelize;

  const Model = app.model.define('user_record', {
    record_id: {
      type: DataTypes.INTEGER(10),
      allowNull: false,
      primaryKey: true,
      autoIncrement:true
    },
    device_id: {
      type: DataTypes.INTEGER(10),
      allowNull: false
    },
    user_id: {
      type: DataTypes.INTEGER(10),
      allowNull: false
    },
    ctime: {
      type: DataTypes.TIME,
      allowNull: false,
      defaultValue: DataTypes.literal('CURRENT_TIMESTAMP')

    },
    mtime: {
      type: DataTypes.TIME,
      allowNull: false,
      defaultValue: DataTypes.literal('CURRENT_TIMESTAMP')

    },
    status:{
      type: DataTypes.INTEGER(4),
      allowNull: false
    },
    delay_status:{
      type:DataTypes.INTEGER(4),
      allowNull:false
    }
  }, {
    tableName: 'user_record'
  });

  Model.associate = function() {

  };

  return Model;
};
